import request from "@/utils/request";

export function addUser(data) {
  return request({
    url: "/api/user/add",
    method: "post",
    data,
  });
}

export function updateUser(data) {
  return request({
    url: "/api/user/update",
    method: "post",
    data,
  });
}

export function reqUserInfo(pageNo,pageSize){
  return request({
    url:`/api/user?pageNo=${pageNo}&pageSize=${pageSize}`,
    method:"get"
  })
}

export function delUser(data) {
  return request({
    url: `/api/user/remove`,
    method: "post",
    data
  });
}

export function delBatchUser(data) {
  return request({
    url: "/api/user/delBatch",
    method: "post",
    data,
  });
}

export function searchUser(title){
    return request({
      url: `/api/user/search?title=${title}`,
      method: "get",
    });
}